﻿using System;
using System.Web.Script.Serialization;
using IPCChannel;

namespace UProveAPI
{
    public enum SetupDataType
    {
        InitializeSetup,
        SetupFinished,
        VerifyParameters,
    }

    [Serializable]
    public class SetupMessage : IPCMessage
    {
        public SetupDataType DataType;
        public int AttributeCount;
        public string IssuerParamsJSON;

        public SetupMessage()
            : base(IPCMessageTypes.SetupMessage)
        {
        }

        public SetupMessage(SetupDataType dataType)
            : base(IPCMessageTypes.SetupMessage)
        {
            DataType = dataType;
        }

        public override string Serialize()
        {
            return new JavaScriptSerializer().Serialize(this);
        }
    }
}
